﻿using FieldTools.Util;
using MahApps.Metro.Controls;
using System;
using System.Windows;
using System.Windows.Controls;

namespace FieldTools.Client.View.Window
{
    /// <summary>
    /// BlankWindow.xaml 的交互逻辑
    /// </summary>
    public partial class BlankWindow : MetroWindow, ITransientDependency
    {
        /// <summary>
        /// 
        /// </summary>
        public BlankWindow()
        {
            this.DataContext = this;
            InitializeComponent();
        }

        /// <summary>
        /// 包含参数内容的初始化构造
        /// </summary>
        public BlankWindow(string text)
        {
            this.DataContext = this;
            TextBlockText = text;
            InitializeComponent();
        }
        /// <summary>
        /// 依赖属性绑定
        /// </summary>
        public static readonly DependencyProperty textBlockTextProperty = DependencyProperty.Register("TextBlockText", typeof(string), typeof(BlankWindow), null);
        /// <summary>
        /// 依赖属性，空白页提示文本
        /// </summary>
        public string TextBlockText
        {
            get { return (string)GetValue(textBlockTextProperty); }
            set { SetValue(textBlockTextProperty, value); }
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Console.WriteLine("测试日志打印");
        }
    }
}
